<template>
  <el-row>
    <TimeRange
        v-show="currTabNum===1"
        @getCategoryData="getCategoryData"
    />
    <Space v-show="currTabNum===2"/>
    <Type
        v-show="currTabNum===3"
        :category-data="categoryData"
    />
  </el-row>
</template>

<script>
// ---------------- 自定义组件 --------------
import Space from "./space"
import TimeRange from "./timeRange"
import Type from "./type"

export default {
  components: {Space, TimeRange, Type},
  props: {
    currTabNum: {
      type: Number,
      default: 1
    },
    tabNum: {
      type: Number,
      default: 1
    },
  },
  data() {
    return {
      categoryData: []
    }
  },
  methods: {
    getCategoryData: function (val) {
      this.categoryData = val;
    }
  }
}
</script>

<style scoped>

</style>